Example

In this lesson, we'll look at a practical example of an app to demonstrate what we've learned in this chapter.

We'll cover the following

Introduction#

This example is not only provided in the Heroku cloud but also as a coding environment on Educative below.

To start the environment, press run. This takes quite a while because all the Docker containers are built, and also all the dependencies are downloaded from the Internet. The website will be available on a link generated below the environment such as: https://x6jr4kg.educative.run.

A detailed description of how the example can be started locally is available at https://github.com/ewolff/crimson-assurance-demo/blob/master/HOW-TO-RUN.md.

/
docker-compose.yml
Your app can be found at: https://811lgmnxmw1xy.educative.run

Network ports#

The application is available at port 3000 on the Docker host. Postbox has port 3001, letter port 3002, and damage port 3003 (see the drawing below). The frontend services communicate with the backend, which runs in a separate Docker container.

svg viewer
Docker Containers in the Example

Of course, the ports of the Docker containers could be redirected to any other ports of the Docker host. Likewise, all applications in the Docker containers can use the same ports in each Docker container.

However, to save confusion, in this example, the port numbers of the containers are identical to those of the hosts.

You can also try the system directly on the web at Heroku. The links then point to the separate applications for postbox, letter, and damage also deployed at Heroku. Heroku is a PaaS (Platform as a Service, see chapter 14) available in the public cloud.


In the next lesson, we’ll look at a few variations to the approaches we’ve already discussed.

Other Integration Methods
Variations
Mark as Completed
Report an Issue